import Web3Init from 'web3-init';
import file from './file.js';
Web3Init.url = file.rpc;
export default {
	async idoInit() {
		let {
			ido_abi,
			ido_address,
		} = file;
		let instance = new Web3Init({
			artifact:null,
			address:ido_address,
			abi:ido_abi
		});
		let obj = await instance.init();
		return obj;
	},
	async erc20Init(address) {
		let {
			erc20_abi,
			ido_address,
		} = file;
		let instance = new Web3Init({
			artifact:null,
			address:address,
			abi:erc20_abi
		});
		let obj = await instance.init();
		return obj;
	},
}